#!/usr/bin/env/ python
# -*- coding: utf-8 -*-

"""
@author: super
@software: PyCharm
@file: 01_闭包的使用
@time: 2021/11/10 10:49
"""

def student(name):
    age = 18

    def massge(msg, new_age):
        nonlocal age;
        age = new_age
        print(name, ":", msg,":", new_age)

    return massge

jack = student("jack")

tom = student("tom")

jack("这是啥！", 20)
tom("这是money！", 20)